layui.config({
    base: basePath,
    version: skyeyeVersion
}).extend({
    window: 'js/winui.window'
}).define(['window', 'jquery', 'winui'], function (exports) {
    winui.renderColor();
    layui.use(['form'], function (form) {
        var index = parent.layer.getFrameIndex(window.name);
        var $ = layui.$;

        showGrid({
            id: "showForm",
            url: sysMainMation.admBasePath + "selectReportById",
            params: { id: parent.rowId },
            pagination: false,
            template: getFileContent('tpl/forumreportcheck/reportcheckdetailsTemplate.tpl'),
            ajaxSendLoadBefore: function (hdb, json) {
                // 处理举报类型和审核状态
                if (json.bean) {
                    // 处理举报类型 - 使用数据字典获取名称
                    json.bean.reportTypeName = sysDictDataUtil.getDictDataNameByCodeAndKey("BBS_FORUM_REPORT_TYPE", json.bean.reportTypeId);

                    // 处理审核状态
                    if (json.bean.examineState == '1') {
                        json.bean.examineStateName = "未审核";
                    } else if (json.bean.examineState == '2') {
                        json.bean.examineStateName = "已通过";
                    } else if (json.bean.examineState == '3') {
                        json.bean.examineStateName = "未通过";
                    } else {
                        json.bean.examineStateName = "参数错误";
                    }
                }
            },
            ajaxSendAfter: function (json) {
                if (json.bean.examineState == "1") {
                    $(".examine").addClass("layui-hide");
                } else if (json.bean.examineState == "2") {
                    $(".nopass").addClass("layui-hide");
                }
                if (json.bean.reportTypeId != "其他") {
                    $(".reportcontent").addClass("layui-hide");
                }
                matchingLanguage();
            }
        });

    });
});